<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
$tabs=array(
	array('op'=>'basic','title'=>'卡密设置'),
);
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$data=array_fields(array('time'),$postdata);
		$this->plugin_setting('kami',$data);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('kami');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'卡密设置',
		'tabs'=>$tabs,
		'edit'=>array(
		    array('type'=>'string','title'=>'下单多少分钟后','name'=>'time','help'=>'订单下单未付款，n分钟后自动关闭，空为15分钟后关闭，最低为5分钟'),

		),
	);
	$return['htmls']=$htmls;
	exi($return);
}